package com.cc.service.impl;

import com.cc.dto.BookParam;
import com.cc.entity.Book;
import com.cc.mapper.BookMapper;
import com.cc.service.BookService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class BookServiceImpl implements BookService {
    @Autowired
    BookMapper bookMapper;
    @Override
    public List<Book> list(BookParam bookParam) {
        return bookMapper.getList(bookParam);
    }

    @Override
    public int add(Book book) {
        return bookMapper.add(book);
    }

    @Override
    public int update(Book book) {
        return bookMapper.update(book);
    }

    @Override
    public int delete(Book book) {
        return bookMapper.delete(book);
    }
}
